<template>
  <navbarback></navbarback>
  <view class="visit-container">
    <scroll-view scroll-y>
      <view class="visitDesc-header">
        <view class="visitDesc-header-item">
          <text class="visitDesc-header-text">姓名：{{ infoform.name }}</text>
        </view>
        <view class="visitDesc-header-item">
          <text class="visitDesc-header-text">性别：{{ infoform.sex }}</text>
        </view>
        <view class="visitDesc-header-item">
          <text class="visitDesc-header-text">年龄：{{ infoform.age }}岁</text>
        </view>
      </view>

      <view class="visitDesc-body">
        <view class="visitDesc-singlerow">
          <view class="visitDesc-singlerow-left">患者所属人群</view>
          <view class="visitDesc-singlerow-right">{{ infoform.disease }}</view>
        </view>
        <view class="visitDesc-singlerow">
          <view class="visitDesc-singlerow-left">体检时间</view>
          <view class="visitDesc-singlerow-right">{{ infoform.healthTime }}</view>
        </view>
        <view class="visitDesc-sixrow">
          <view class="visitDesc-sixrow-left">体征</view>
          <view class="visitDesc-sixrow-right-box">
            <view class="visitDesc-singlerow">
              <view class="visitDesc-singlerow-left" style="width: 46.8%">血压(mmHg)</view>
              <view class="visitDesc-singlerow-right" style="width: 53.2%">{{
                infoform.bloodPressure
              }}</view>
            </view>
            <view class="visitDesc-singlerow">
              <view class="visitDesc-singlerow-left" style="width: 46.8%">脉率(次/分钟)</view>
              <view class="visitDesc-singlerow-right" style="width: 53.2%">{{
                infoform.pulseRate
              }}</view>
            </view>
            <view class="visitDesc-singlerow">
              <view class="visitDesc-singlerow-left" style="width: 46.8%">身高(cm)</view>
              <view class="visitDesc-singlerow-right" style="width: 53.2%">{{
                infoform.height
              }}</view>
            </view>
            <view class="visitDesc-singlerow">
              <view class="visitDesc-singlerow-left" style="width: 46.8%">体重(kg)</view>
              <view class="visitDesc-singlerow-right" style="width: 53.2%">{{
                infoform.weight
              }}</view>
            </view>
            <view class="visitDesc-singlerow">
              <view class="visitDesc-singlerow-left" style="width: 46.8%">体温(摄氏度)</view>
              <view class="visitDesc-singlerow-right" style="width: 53.2%">{{
                infoform.temperature
              }}</view>
            </view>
            <view class="visitDesc-singlerow">
              <view class="visitDesc-singlerow-left" style="width: 46.8%">血糖(mg/dL)</view>
              <view class="visitDesc-singlerow-right" style="width: 53.2%">{{
                infoform.bloodGlucose
              }}</view>
            </view>
          </view>
        </view>

        <view class="visitDesc-singlerow">
          <view class="visitDesc-singlerow-left">其它备注</view>
          <view class="visitDesc-singlerow-right">{{ infoform.result }}</view>
        </view>
      </view>
    </scroll-view>
  </view>
</template>

<script setup lang="ts">
import navbarback from '@/component/navbarback2.vue'
import { onLoad, onShow, onTabItemTap } from '@dcloudio/uni-app'
import { http } from '@/utils/http'
import { useVisitStore } from '@/stores/modules/visit'
import { ref, defineProps } from 'vue'
const query = defineProps<{ params: any }>()
const infoform = ref()
infoform.value = JSON.parse(query.params)
console.log(infoform.value)
</script>

<style scoped lang="scss">
.visit-container {
  background-color: #f4f4f4;
  width: 100%;
  height: calc(100vh - 55rpx);
  padding: 0rpx 20rpx;
}
.visitDesc-header {
  border-radius: 5rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15rpx 5rpx 5rpx 5rpx;
  .visitDesc-header-item {
    font-size: 13rpx;
  }
}
.visitDesc-body {
  margin: 10rpx 0;
  border: 1rpx solid #ccc;
  border-radius: 5rpx;
  width: 100%;
  background-color: #fff;
  .visitDesc-singlerow {
    display: flex;
    font-size: 13rpx;
    border-bottom: 1rpx solid #ccc;
    min-height: 30rpx;
    max-height: 80rpx;
    .visitDesc-singlerow-left {
      padding-left: 10rpx;
      width: 50%;
      border-right: 1rpx solid #ccc;
      display: flex;
      align-items: center;
    }
    .visitDesc-singlerow-right {
      padding-left: 10rpx;
      width: 50%;
      display: flex;
      align-items: center;
    }
  }
}
.visitDesc-sixrow {
  display: flex;
  font-size: 12rpx;
  border-bottom: 1rpx solid #ccc;
  height: 180rpx;
  align-items: center;
  .visitDesc-sixrow-left {
    padding-left: 10rpx;
    width: 6%;
    height: 100%;
    border-right: 1rpx solid #ccc;
    display: flex;
    align-items: center;
  }
  .visitDesc-sixrow-right-box {
    width: 94%;
    height: 100%;
  }
}
</style>
